﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.SharePoint.WebControls;
using System.Web.UI.WebControls;

namespace SharePointees.EnhancedLookupField.Controls
{
    class ELFDropDownList : FormField
    {

        DVDropDownList ddlLookup;
        protected override void CreateChildControls()
        {
            if (base.ControlMode == Microsoft.SharePoint.WebControls.SPControlMode.Edit || base.ControlMode == Microsoft.SharePoint.WebControls.SPControlMode.New)
            {
                ddlLookup = new DVDropDownList();
                ddlLookup.ID = "ParentLookupField";
                if (!Field.Required)
                    ddlLookup.Items.Insert(0, new ListItem(string.Empty, string.Empty));
            }
            else
                base.CreateChildControls();
        }
    }
}
